import 'package:flutter/foundation.dart';
import 'package:get/get.dart';
import '../../widget/bottom_sheet/bottom_sheet_util.dart';
import 'bottom_sheet_state.dart';

class BottomSheetLogic extends GetxController {
  final BottomSheetState state = BottomSheetState();

  @override
  void onInit() {
    var map = Get.arguments;
    state.title = map["title"];
    super.onInit();
  }

  /// 显示抽屉层动作列表
  void showBottomSheetAction() {

    List<String?> titleList = ["中国","美国","日本","澳大利亚","新加坡"];

    BottomSheetUtil().showBottomSheetActionWidget(titleList,
        actionItemEvent: (String? title, int index) {
            /// item点击事件
          if (kDebugMode) {
            print("title:$title==============index:$index");
          }
        });
  }

}
